package com.mushiengine.core {
import com.mushiengine.collection.IMap;
import com.mushiengine.test.MyBeanLoader;

import flexunit.framework.TestCase;

public class BeanDefinitionLoaderTest extends TestCase{

    private var _testBeanLoader:MyBeanLoader;

    public function BeanDefinitionLoaderTest() {
    }


    override public function setUp():void {
        _testBeanLoader = new MyBeanLoader();
    }

    public function testCanLoadADctionaryOfBeansFromitSelf():void {

        var beanDictionary:IMap = _testBeanLoader.getDescriptions();


        assertEquals(3, beanDictionary.size());
    }

    public function testBeanDefIsLoadedCorrectly():void {
        var beanDictionary:IMap = _testBeanLoader.getDescriptions();

        assertEquals("com.mushiengine.test.objects::ExampleBean", beanDictionary.getValue("expBean"));
        assertEquals("com.mushiengine.test.objects::InjectedBean", beanDictionary.getValue("injectedBean"));

    }


}
}